<div id="blog-con" class="content">
    <div id="blog-wrap">
        <table width="100%">
            <tr>
                <td>
                    <div class="left-con">
                        <div class="blog-separator" style="height:120px;"></div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/web"><img src="<?php echo base_url(); ?>assets/images/web-logo.png" title="Komunitas Web"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/mobile"><img src="<?php echo base_url(); ?>assets/images/mobile-logo.png" title="Komunitas Mobile"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/analyst"><img src="<?php echo base_url(); ?>assets/images/analyst-logo.png" title="Komunitas Analyst"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/event"><img src="<?php echo base_url(); ?>assets/images/event-logo.png" title="Event"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/appreciation"><img src="<?php echo base_url(); ?>assets/images/apprecation-logo.png" title="Appreciation"/></a>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="blog-center-con"> <!--style="background-color: #FFCC00;">!-->
                        <div id="target" class="addblog-content">
                            <form name="form" class="blogform" action="<?php echo base_url(); ?>blog/edit_article/<?php echo $article[0]->idartikel; ?>" method="POST" onsubmit="return validate_article(this,'edit')" enctype="multipart/form-data">
                                <fieldset>
                                    <legend> Edit Blog </legend>
                                    <label for="judul">Title</label>
                                    <input type="text" id="judul" name="judul" tabindex="1" value="<?php echo ($article[0]->judul); ?>" />
                                    <br/>
                                    <label for="penulis">Writer</label>
                                    <input type="text" id="penulis" name="penulis" tabindex="2" value="<?php echo ($article[0]->penulis); ?>"/>
                                    <br/>
                                    <label for="kategori">Category</label>
                                    <div id="formgroup-checkbox" tabindex="3">
                                        <?php
                                        $iter = 0;
                                        if ($category != false) {
                                            foreach ($category as $rows) {
                                                $check_bool = 'off';
                                                foreach ($article_category as $row_art) {
                                                    if ($row_art->nama == $rows->nama) {
                                                        $check_bool = 'on';
                                                        break;
                                                    }
                                                }
                                                ?>
                                                <div class="blogformcheckbox"><input type="checkbox" id="<?php echo $rows->nama; ?>" name="<?php echo $rows->nama; ?>" class="form-checkbox" 
                                                                                     value="<?php echo $check_bool; ?>" <?php if ($check_bool == "on") {
                                            echo "checked='true'";
                                        } ?>/><?php echo $rows->nama; ?></div>
                                                    <?php
                                                }
                                            }
                                            ?>
                                    </div>
                                    <br/>
                                    <label>Picture</label>
                                    <input disabled="true" type="text" value="<?php echo $article[0]->url_image; ?>"/>
                                    <input type="hidden" id="pictfile" name="pictfile" value="<?php echo $article[0]->url_image; ?>"/>
                                    <br />
                                    <label>Edit Picture</label>
                                    <input type="file" id="userfile" name="userfile" tabindex="4"/>
                                    <br />
                                    <label for="konten">Content</label>
                                    <textarea id="konten" name="konten" cols="20" rows="15" tabindex="5"><?php echo $article[0]->konten; ?></textarea>
                                    <br/>
                                    <label for="submit"></label>
                                    <input type="Submit" name="Submit" value="Submit" id="blogformsubmit"/>
                                    <?php echo validation_errors(); ?>
                                </fieldset>
                            </form>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>